<?php

/**
 * This is the model class for table "merchant".
 *
 * The followings are the available columns in table 'merchant':
 * @property string $id_newretail_merchant
 * @property string $merchant_id
 * @property string $name
 * @property string $out_accnt_no
 * @property string $remain_cash
 * @property string $md5_token
 * @property string $total_remain_cash
 * @property string $create_time
 * @property string $update_time
 */
class NewretailMerchant extends ActiveRecord
{
    protected $_curl;
    public function init()
    {
        $this->_curl = new Curl();
    }

    /**
     * Returns the static model of the specified AR class.
     * @param string $className active record class name.
     * @return Merchant the static model class
     */
    public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }

    /**
     * @return string the associated database table name
     */
    public function tableName()
    {
        return 'newretail_merchant';
    }

    /**
     * @return array validation rules for model attributes.
     */
    public function rules()
    {
        // NOTE: you should only define rules for those attributes that
        // will receive user inputs.
        return array(
            array('id_newretail_merchant', 'merchant_id', 'name, remain_cash, md5_token, out_accnt_no, create_time, update_time', 'safe'),
        );
    }

    /**
     * @return array relational rules.
     */
    public function relations()
    {
        // NOTE: you may need to adjust the relation name and the related
        // class name for the relations automatically generated below.
        return array(
        );
    }

    /**
     * @return array customized attribute labels (name=>label)
     */
    public function attributeLabels()
    {
        return array(
        );
    }
}
